<%@ page contentType="text/html" language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib  uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>马鞍山市志业软件管理系统</title>
<style type="text/css">
input {
	border:0;
}
body {
	background: #000 url(img/loginbg.gif) center top no-repeat;
	color:#666;
}
#box {
	background:url(img/box.png) no-repeat;
	width:500px;
	height:481px;
	margin:100px auto 0;
}
#name {
	margin-top:75px;
	margin-left:70px;
	float:left;
}
.input {
	background:url(img/input.gif) no-repeat;
	width:347px;
	height:37px;
	float:left;
	display:inline;
	line-height:37px;
	padding:0 10px;
	font-size:20px;
	font-weight:bold;
	color:#666;
}
.user {
	margin-top:65px;
	margin-left:65px;
}
.pass {
	margin-top:52px;
	margin-left:65px;
}
#codeBox {
	float:left;
}
.codeText {
	background:url(img/code1.gif) no-repeat;
	width:91px;
	height:31px;
	float:left;
	display:inline;
	line-height:31px;
	padding:0 10px;
	font-size:20px;
	font-weight:bold;
	color:#666;
	margin-left:175px;
	margin-top:35px;
}
.codeImg {
	float:left;
	margin:36px 0 0 10px;
	cursor:pointer;
}
.btn {
	background:url(img/adminbtn.gif) no-repeat;
	float:right;
	width:162px;
	height:50px;
	margin-right:62px;
	margin-top:20px;
	cursor:pointer;
}
ul.errorMessage { float:left; margin-left:40px; margin-top:35px; color:#d40007; font-size:14px; font-family:"微软雅黑", Arial, Helvetica, sans-serif; font-weight:bold;}
</style>
<!--[if IE 6]>
	<script type="text/javascript" src="/js/DD_belatedPNG.js" ></script>
	<script type="text/javascript">
	DD_belatedPNG.fix('img, #box');
	</script>
<![endif]-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript"> 
<!--
                            function changeKaptcha(){
                                $("#codeImg").attr("src", "image.jsp");
                            }

                            function checkForm(){
                            	if($("#loginName").val()==undefined ||$("#loginName").val().trim()==""){
                            		alert("请输入用户名!");
                            		$("#loginName").focus();
                            		return false;
                            	}
                            	if($("#loginPassword").val()==undefined ||$("#loginPassword").val().trim()==""){
                            		alert("请输入密码！");
                            		$("#loginPassword").focus();
                            		return false;
                            	}
                            	if($("#code").val()==undefined ||$("#code").val().trim()==""){
                            		alert("请输入验证码！");
                            		$("#code").focus();
                            		return false;
                            	}
                            	return true;
                            }
function _key() { 
if(event){
if(event.keyCode ==13) 
 	checkForm(); 
}
}
//-->
</script> 
</head>
<body onkeydown="_key()">
<div id="box">
  <div id="name"><img src="img/name.gif" /></div>
  <form id="userForm" action="Login.action" method="post" onsubmit="javascript:return checkForm();">
    <input type="text" name="c_V_Sys_LoginInfo.loginName" id="loginName" size="20" class="input user"/>
    <input type="password" name="c_V_Sys_LoginInfo.loginPassword" id="loginPassword" size="20" class="input pass" />
    <div id="cdeBox">
      <input type="text" class="codeText" name="code" id="code" />
      <span class="codeImg"><img src="image.jsp"/></span> </div>
    <input type="submit" class="btn" value=""/>
    <div>
        <ul class="errorMessage">
			<s:if test="%{message == 'error'}">
			<li>用户名或密码错误!</li>
			</s:if>
			<s:if test="%{message == 'codeError'}">
			<li>验证码输入错误!</li>
			</s:if>
			<s:if test="%{message == 'userError'}">
			<li>用户不存在或员工以离职!</li>
			</s:if>
		</ul>
      </div>
  </form>
</div>
</body>
</html>
